'use strict';
module.exports = () => {
  return async function adminauth(ctx, next) {
    if (ctx.session.SESSION_ADMIN) {
      await next();
    } else {
      // await next();
      ctx.body = {
        msg: '没有登录',
        code: '305',
      };
    }
  };
};
